import {html, TemplateResult} from 'lit';
import type {Meta, StoryObj} from '@storybook/web-components';
import "../../../echarts/graphic/lit-loading.ts"
import {LoadingProps} from "../../../echarts/graphic/lit-loading.ts";

const meta: Meta<LoadingProps> = {
    title: 'Echarts/LitLoading',
    tags: ['autodocs'],
    render: (args: LoadingProps): TemplateResult => {
        return html`<lit-loading 
            .chartId=${args.chartId}
            .width=${args.width}
            .height=${args.height}
            .size=${args.size}
            .color=${args.color}
        />`;
    },
    argTypes: {
        chartId: { control: 'text' },
        width: { control: 'text' },
        height: { control: 'text' },
        size: { control: 'number' },
        color: { control: 'color' },
    },
};

export default meta;
type Story = StoryObj<LoadingProps>;

export const Default: Story = {
    args: {
        chartId: 'basic-loading-chart',
        width: '200px',
        height: '100px',
        size: 1,
        color: '#5470c6',
    }
}